#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTextCursor>
#include <QTextImageFormat>

#include "automation.h"
#include "tokenfile.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    QString GetCode();

    void ShowCode(QByteArray filePath);

    void SetToken(const Token& tok, int& row);

signals:
    void LookChar();
    void LookKeyword();
    void LookSingle();
    void LookVariety();

protected:
    void ShowAuto(QByteArray filePath);

private:
    Ui::MainWindow *ui;
    TokenFile op;
    TokenList list;
};
#endif // MAINWINDOW_H
